package com.mirror.repository;

import com.mirror.entity.building.Building;
import com.mirror.entity.building.Floor;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface FloorRepository extends JpaRepository<Floor, String>, JpaSpecificationExecutor<Floor> {


    Page<Floor> findAllByIsdelAndBuildingOrderByFloorName(Pageable pageable, boolean isdel, Building building);

    List<Floor> findAllByIsdelAndBuildingOrderByFloorName(boolean isdel, Building building);

    List<Floor> findAllByIsdelAndBuilding_IdOrderByFloorName(boolean isdel, String building);

}
